package com.wangshuile.vue.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

@Entity
@Table(name = "article")
@Data
public class Article {
	
	@Id
    @GenericGenerator(name = "idGenerator", strategy = "uuid")
    @GeneratedValue(generator = "idGenerator")
	private String id;
	/**
	 * name@字段名称
	 * unique@是否唯一
	 * nullable@是否为空
	 * length@长度
	 */
	@Column(name = "name", unique = true, nullable = false, length = 64)
	private String name;
	
	@Column(name = "time")
	@JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
	private Date time;

}
